// 首页路由
const dashboardBreadCrumb = [{ name: "首页", code: "/dashboard" }];
export const dashboardRoutes = [
  {
    path: "/dashboard",
    name: "Dashboard",
    component: () =>
      import(
        /* webpackChunkName: "Dashboard" */ "@/views/dashboard/dashboard.vue"
      ),
    meta: {
      title: "首页",
      breadcrumbList: dashboardBreadCrumb,
      isKeepAlive: true,
    },
  },
];

// 数据管理路由
const dataBreadCrumb = [...dashboardBreadCrumb, { name: "数据管理", code: "" }];
const dataRoutes = [
  {
    path: "/project",
    name: "Project",
    component: () =>
      import(
        /* webpackChunkName: "Project" */ "@/views/data/project/project.vue"
      ),
    meta: {
      title: "项目",
      breadcrumbList: [...dataBreadCrumb, { name: "项目", code: "" }],
      isKeepAlive: true,
    },
  },
];

// 权限管理路由
const permissionBreadCrumb = [
  ...dashboardBreadCrumb,
  { name: "权限管理", code: "" },
];
const permissionRoutes = [
  {
    path: "/user",
    name: "User",
    component: () =>
      import(/* webpackChunkName: "User" */ "@/views/permission/user/user.vue"),
    meta: {
      title: "用户",
      breadcrumbList: [...permissionBreadCrumb, { name: "用户", code: "" }],
      isKeepAlive: true,
    },
  },
];

export default [...dashboardRoutes, ...dataRoutes, ...permissionRoutes];
